home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Amiga Public Domain Connection / APDC Disk #025 - Programming Languages (198x)(Amiga Public Domain Connection)(US)[m][WB].zip / APDC Disk #025 - Programming Languages (198x)(Amiga Public Domain Connection)(US)[m][WB].adf / MVP-Forth / mvpamiga.ext < prev    next >
Text File  |  1988-03-15  |  5KB  |  1 lines

  1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 \  Special Amiga extensions      load screen           gst851224                                                                                                                                2 4 thru    \   load special extensions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         \   ON   OFF    ASCII                                  gst851224                                                                : ON    \ addr -- |  set to TRUE                                   true  swap  !  ;                                                                                                             : OFF   \ addr -- |  set to FALSE                                  false  swap  !  ;                                                                                                            : ASCII   \  -- n  |  state smart converts char to numeric         bl word  1+  c@  [compile] literal  ;   immediate                                                                                                                                                                                                                                                                                                                                                                                                            \ "Register Stuffing"                                  gst850930: Get.Reg# ( -- <digit> regaddr \ parses out a digit )             bl word dup count >Uppercase 1+ c@  10 digit                    0= abort" Huh?"    4 *  Registers +  ;                       : Tagged?   ( c -- f )  here 2+ c@ = here c@ 1 > and  ;                                                                         : WhichReg ( -- regaddr )                                          Get.Reg#   ascii W tagged? ascii B tagged? or                   if  compile LITW!    else   ascii L tagged?                     if  compile LIT!  2+ else   ascii X tagged?                     if  compile LITX!    else   ascii H tagged?                     if  compile LIT!     else compile LIT2!                         then then then then   ;                                                                                                      \ W or B pads 0 in high, L and H stuff half the reg             \ X forces sign extension                                       \ Exec interface -- lib calling                        gst850930: >RD     WhichReg  , ( offset)  ; immediate                    : >RA     WhichReg  32 + , ( offset to A regs) ; immediate                                                                      : LVO,   ( -- <hexnum> hexnum )                                    base @ >R  [compile] hex                                        bl word dup count >Uppercase number drop                        r> base ! ,  ;                                                                                                               : EXEC:   ( -- <LVO>  \ compile an EXEC call )                     compile LIBRARY: ExecBase ,  LVO,  ; immediate                                                                               : DOS:    ( -- <LVO>  \ compile a DOS call )                       compile LIBRARY: DosBase , LVO,   ; immediate                                                                                \ used:   : FOO ...   >RA 1  >RD 0W  DOS: FFE0  RESULT  ... ;